(use-modules 
 (gnu home)
 (gnu home services)
 (gnu home services shells)
 (gnu packages)
 (gnu services)
 (gnu services base)
 (guix gexp))

;; definition: .bash_profile
(define my-bash-profile
 (string-append 
  "GUIX_EXTRA_PROFILES=/home/miaomiao/.guix-extra-profiles;
   for i in $GUIX_EXTRA_PROFILES/*; do
     profile=$i/$(basename \"$i\")
     if [ -f \"$profile\"/etc/profile ]; then
       GUIX_PROFILE=\"$profile\"
       . \"$GUIX_PROFILE\"/etc/profile
       XDG_DATA_DIRS=$XDG_DATA_DIRS:$profile/share
     fi
     unset profile
   done"))

;; definition: .bashrc
;; (Empty for now!)
(define my-bashrc
 (string-append ""))

(home-environment
 ;; Below is the list of Home services.  To search for available
 ;; services, run 'guix home search KEYWORD' in a terminal.
 (services
  (list 
   (service home-bash-service-type
    (home-bash-configuration
     (guix-defaults? #t)
     (environment-variables
      '(("XDG_DATA_DIRS" . "/var/lib/flatpak/exports/share:/home/miaomiao/.local/share/flatpak/exports/share:$XDG_DATA_DIRS")
        ("GUIX_EXTRA_PROFILES" . "/home/miaomiao/.guix-extra-profiles")))
     (aliases 
      '(("la" . "ls -a --color=auto")))
     (bash-profile
      (list
       (plain-file "bash-profile" my-bash-profile)))
     (bashrc 
      (list
       (plain-file "bashrc" my-bashrc))))))))
